#include <stdio.h>
#include <string.h>
#include <math.h>
	
	int 	z[1001],total=2;
	int	n,c;

main()
{
	int	i,j,k,br,start,tot;
	memset(z,0,sizeof(z));
	z[1]=1;
	z[2]=2;
	for (i=3;i<=1001;i++) {
		k=0;
		for (j=2;(z[j]<=i-1 && j<=total);j++) 
			if (i%z[j]==0) {k=1;break;}
		if (k==0) {z[++total]=i;}
	}
	while(scanf("%d%d",&n,&c)!=EOF) {
 		printf("%d %d:",n,c);
		tot=0;
		for (i=1;i<=total;i++) {
			if (z[i]>n) break;
			tot++;
		}
		if (tot%2==0) {c*=2;} else {c=c*2-1;}
		if (c>=tot) c=tot;
		start=(tot-c)/2+1;
		for (i=1;i<=c;i++) {
			printf(" %d",z[start+i-1]);
		}
		printf("\n");
		printf("\n");
	}
}
